package com.msw.time;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

/**
 * TODO 一句话描述类的含义
 * <p/>
 * Created by hadoop on 16-2-24.
 */
public class JodaTime {

    public static void main(String[] args) {
        DateTime dateTime = new DateTime(DateTimeZone.getDefault());
        DateTimeFormatter format = DateTimeFormat .forPattern("yyyy-MM-dd HH:mm:ss");
        System.out.println(format.print(dateTime));

        System.out.println(format.print(dateTime.withTimeAtStartOfDay()));
        System.out.println(format.print(dateTime.millisOfDay().withMaximumValue()));

    }
}
